package com.test.application.exam;

import java.util.List;
import java.util.Objects;
import java.util.Set;

/**
 * 描述: TODO
 * 作者: yanruizhi
 * 时间: 2024/7/18 23:06
 */
public class CompositeKey {
    public List<String> attrList;
    String name;
    Set<String> attrSet;

    public CompositeKey(String name, Set<String> attrSet) {
        this.name = name;
        this.attrSet = attrSet;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CompositeKey that = (CompositeKey) o;
        return Objects.equals(name, that.name) && Objects.equals(attrSet, that.attrSet);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, attrSet);
    }
}
